// detail/details/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    fileList: [],
    src: ''
  },
  onClickRigh() {

  },
  openPicter() {
    wx.getSetting({
      success:(res) =>{
        console.log(res);
        if (!res.authSetting['scope.camera']) {
          wx.authorize({
            scope: 'scope.camera',
            success: (res)=> {
              console.log(res);
              // 用户已经同意小程序使用录音功能，后续调用 wx.startRecord 接口不会弹窗询问
              // wx.createCameraContext()
              // this.getPicter()
            }
          })
        }else {
          console.log(2);
          // const ctx = wx.createCameraContext()
          //     ctx.takePhoto({
          //       quality: 'high',
          //       success: (res) => {
          //         this.setData({
          //           src: res.tempImagePath
          //         })
          //       }
          //     })
        }
      }
    })
  },
  // getPicter() {
  //   console.log(55);
  // },
  onClickLeft() {
    wx.switchTab({
      url: '/pages/userInfo/userInfo',
    })
  },
  startNavigation() {
    wx.reLaunch({
      url: '/detail_info/pages/navigation/navigation',
    })
  },
})